package com.myapp.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@Entity
@Table(name = "tr_catalogo_elemento")
@NamedQueries({ @NamedQuery(name = "consultarCatalogoElemento", query = " select e from Elemento e where e.idElemento in (" +
		"select ce.idElemento from CatalogoElemento ce where ce.idCatalogo =:idCatalogo order by ce.idCatalogo asc)") })
public class CatalogoElemento {

	@Id
	@Column(name = "id_catalogo_elemento")
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long idCatalogoElemento;

	@Column(name = "id_elemento")
	private Long idElemento;

	@Column(name = "id_catalogo")
	private Long idCatalogo;

	public Long getIdCatalogoElemento() {
		return idCatalogoElemento;
	}

	public void setIdCatalogoElemento(Long idCatalogoElemento) {
		this.idCatalogoElemento = idCatalogoElemento;
	}

	public Long getIdElemento() {
		return idElemento;
	}

	public void setIdElemento(Long idElemento) {
		this.idElemento = idElemento;
	}

	public Long getIdCatalogo() {
		return idCatalogo;
	}

	public void setIdCatalogo(Long idCatalogo) {
		this.idCatalogo = idCatalogo;
	}

}
